<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><s:text name="Uploadify(SWF)"/></title><%@ include file="/common/meta.jsp"%>
<link href="${ctx}/js/uploadify/uploadify.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="${ctx}/js/uploadify/jquery-ui.min.js"></script>
<script type="text/javascript" src="${ctx}/js/uploadify/swfobject.js"></script>
<script type="text/javascript" src="${ctx}/js/uploadify/jquery.uploadify.min.js"></script>
     <script language="javascript" type="text/javascript">
     $(function() {
    		$("#FilePanel").uploadify({
    			'height'        : 30,
    			'swf'           : '${ctx}/js/uploadify/uploadify.swf',
    			'uploader'      : '${ctx}/test-upload!upload.action',
    			'multi'         : false,
    			'auto'          : true,
    			'fileTypeExts'  : '*.*',
    			'fileTypeDesc'  : '所有的东东',
    			'fileObjName'   : 'uploadFile',
    			'fileSizeLimit' : '0',
    			'removeCompleted': false,
    			'buttonText'     : '上传',
    			'uploadLimit'	: '5',
    			'formData'			: {'id':'13'},
    		     'onUploadError'         :function(file, errorCode, errorMsg, errorString){
    				  $("#status1").text("导入失败");
    		   	     },
    		   	  'onUploadComplete'	  : function(file){
    		   	   	  $("#status1").text("已导入");
    		   	   	  }
    		});
    	});
         
    </script>
</head>
<body>
<input type="file" id="FilePanel" name="uploadFile"/>
<div id="status1" align="center"></div>
<p><a href="test-upload!testGetFileInfo.action">测试获取文件信息</a></p>
<s:if test="#request.file != null ">文件信息：${file }</s:if>
</body>
</html>